/*
 * @Author: cl
 * @Description:
 * @Date: 2023-04-18 11:13:18
 * @LastEditTime: 2023-04-19 11:43:47
 * @FilePath: \jsnode\nestjs\naota\src\score\entities\score.entity.ts
 * @LastEditors: cl
 */
import { Student } from 'src/student/entities/student.entity'
import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'

@Entity()
export class Score {
  @PrimaryGeneratedColumn({ type: 'int' })
  id: number

  @Column({ type: 'float' })
  achievement: number

  @Column({ type: 'int' })
  student_id: number

  @Column({ type: 'int' })
  subject_id: number

  @ManyToOne(() => Student, (student) => student.score)
  @JoinColumn()
  student:Student
}
